<template>
	<view>
		<z-paging ref="paging" v-model="dataList" @query="queryList">
			<view class="item" v-for="(item,index) in dataList" :key="index">
				<u--text :text="item.createtime_text" color="#a7a7a7" size="14px" align="center"
					margin="0px 0px 20px 0px" />
				<view class="item_content" @click="goSystem(item)">
					<u--text :text="item.title" color="#595959" bold size="16px" margin="0px 0px 20rpx 0px" />
					<u--text v-if="item.description" :text="item.description" color="#9c9c9c" size="14px"
						margin="0px 0px 20rpx 0px" />
					<u--image :src="imgUrl+item.image" width="100%" height="300rpx" :radius="10">
						<view slot="error" style="font-size: 24rpx;">加载失败</view>
					</u--image>
				</view>
			</view>
		</z-paging>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				dataList: [],
				imgUrl: this.$DOMAIN_URL
			};
		},
		methods: {
			queryList(pageNo, pageSize) {
				this.$http.post('wanlshop/article/getList', {
					page: pageNo,
					limit: pageSize,
					type: "sys"
				}).then(res => {
					res.code == 1 ? this.$refs.paging.complete(res.data.data) : this.$refs.paging.complete(false)
				})
			},
			goSystem(item) {
				uni.$u.route({
					url: 'pagesA/my/parse',
					params: {
						id: item.id
					}
				})
			}
		}
	}
</script>
<style>
	page {
		background: #f8f9fd;
	}
</style>
<style lang="scss" scoped>
	.item {
		padding: 40rpx 30rpx;
	}

	.item_content {
		background: #fff;
		border-radius: 20rpx;
		padding: 30rpx;
	}
</style>
